<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Blog</title>
    <link rel="stylesheet" href="/src/index.css">
    <script type="module" src="/src/main.tsx"></script>
    <body>
      <div id="root"></div>
    <script>
      // 防止主题闪烁的内联脚本
      (function() {
        try {
          var theme = localStorage.getItem('theme');
          if (!theme) {
            // 如果没有保存的主题，使用系统偏好
            var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
            theme = prefersDark ? 'dark' : 'light';
          }
          document.documentElement.setAttribute('data-theme', theme);
        } catch (e) {
          // 如果出错，默认使用亮色主题
          document.documentElement.setAttribute('data-theme', 'light');
        }
      })();
    </script>
      <!-- 鼠标点击特效(六边形边框) -->
      <script type="text/javascript">
        !(function (e, t) {
          function n() {
            var n = "function" == typeof e.onclick && e.onclick;
            e.onclick = function (e) {
              n && n(), o(e);
            };
          }
  
          function o(n) {
            var o = t.createElement("div");
            o.className = "hexagon";
            var i = 30,
              s = n.clientX - i / 2,
              c = n.clientY - i / 2;
            (o.style.cssText =
              "left:" +
              s +
              "px;top:" +
              c +
              "px;width:" +
              i +
              "px;height:" +
              i +
              "px;position:fixed;z-index:99999;pointer-events:none;animation:expandGlow .6s forwards;"),
              (o.innerHTML =
                '<svg viewBox="-50 -50 100 100" width="100%" height="100%" style="display:block;">' +
                "<defs>" +
                '<filter id="whiteGlow" x="-50%" y="-50%" width="200%" height="200%">' +
                '<feGaussianBlur in="SourceGraphic" stdDeviation="4" result="blur"/>' +
                "<feMerge>" +
                '<feMergeNode in="blur"/>' +
                '<feMergeNode in="SourceGraphic"/>' +
                "</feMerge>" +
                "</filter>" +
                "</defs>" +
                '<polygon points="50,0 25,-43.3 -25,-43.3 -50,0 -25,43.3 25,43.3" ' +
                'fill="none" stroke="#D9C08D" stroke-width="3" filter="url(#whiteGlow)"/>' +
                "</svg>"),
              t.body.appendChild(o),
              setTimeout(function () {
                t.body.removeChild(o);
              }, 600);
          }
          n();
        })(window, document);
      </script>
  </body>
</html>
